package org.jeecg.modules.storage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.storage.entity.PackageStorageMaterial;
import org.jeecg.modules.storage.vo.PackageStorageMaterialVo;

/**
 * @Description: 包材入库单物料
 * @Author: jeecg-boot
 * @Date:   2024-08-05
 * @Version: V1.0
 */
public interface PackageStorageMaterialMapper extends BaseMapper<PackageStorageMaterial> {

	/**
	 * 通过主表id删除子表数据
	 *
	 * @param mainId 主表id
	 * @return boolean
	 */
	public boolean deleteByMainId(@Param("mainId") String mainId);

  /**
   * 通过主表id查询子表数据
   *
   * @param mainId 主表id
   * @return List<PackageStorageMaterial>
   */
	public IPage<PackageStorageMaterialVo> selectByMainId(Page<PackageStorageMaterialVo> page, @Param("mainId") String mainId);
}
